# Create your views here.
from arnagroup.shortcuts import r
from django.shortcuts import get_object_or_404
from arnagroup.danismanlar.models import Danisman, Makale

def danisman_detay(request, danisman_id):
  danisman = get_object_or_404(Danisman, pk=danisman_id)
  makaleler = Makale.objects.order_by('-weight')
  return r('danismanlar/danisman_detail.html', {
                                                'danisman':danisman, 
                                                'makaleler':makaleler
                                                }, request)

def makale_detay(request, makale_id):
  makale = get_object_or_404(Makale, pk=makale_id)
  return r('danismanlar/makale.html', {'makale':makale}, request)
